package cn.laixueit.service.impl;

import cn.laixueit.mapper.StudentMapper;
import cn.laixueit.pojo.Student;
import cn.laixueit.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = RuntimeException.class)
public class StudentServiceImpl implements StudentService {


    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Student> findAll() {
        List<Student> studentList = studentMapper.selectByExample(null);
        return studentList;
    }
}
